package com.xyoto.community.mapper.love;

import com.xyoto.community.entity.love.QuestionCommentReplyLove;
import com.xyoto.community.po.MessageQuestionCommentReplyLovePO;

import java.util.List;

/**
 * ClassName:
 * Author:      挽风
 * Date:        2020
 * Copyright:   2020 by 挽风1.0版本
 * Description:
 **/
public interface QuestionCommentReplyLoveMapper {

    /**
     * 根据问答评论回复id查询问答评论回复点赞数
     *
     * @param id 问答评论回复id
     *
     * @return 点赞数
     */
    Integer getQuestionCommentReplyLoveCount(Integer id);


    /**
     * 新增问答评论回复点赞
     * @param replyLove
     * @return
     */
    Integer saveReplyLove(QuestionCommentReplyLove replyLove);

    /**
     * 取消问答评论回复点赞
     * @param questionCommentReplyLove 实体
     * @return
     */
    Integer removeQuestionCommentReplyLove(QuestionCommentReplyLove questionCommentReplyLove);

    /**
     * 获取评论回复点赞状态
     * @param questionCommentReplyId
     * @param userId
     * @return
     */
    QuestionCommentReplyLove getReplyLoveStatus(Integer questionCommentReplyId, Integer userId);

    /**
     *
     * @param questionCommentReplyIds
     * @return
     */
    List<MessageQuestionCommentReplyLovePO> getQuestionCommentReplyLoveList(List<Integer> questionCommentReplyIds);

    /**
     * 获取指定用户id的所有问答评论回复获赞数
     * @param userId
     * @return
     */
    Integer countLoveByUerId(Integer userId);


    /**
     * 获取评论回复点赞对像
     * @param questionCommentReplyId
     * @param userId
     * @return
     */
    QuestionCommentReplyLove getReplyLove(Integer questionCommentReplyId,Integer userId);
}
